//
//  FaceScene.h
//  Ray Tracer
//
//  Created by Kaila, Ashish on 4/20/13.
//  Copyright (c) 2013 Kaila, Ashish. All rights reserved.
//

#ifndef Ray_Tracer_FaceScene_h
#define Ray_Tracer_FaceScene_h

void renderFaceScene(Raytracer& raytracer,
                     int width,
                     int height,
                     bool enableSpecular)
{
    // Camera parameters.
	Point3D eye(0, 0, 1);
	Vector3D view(0, 0, -1);
	Vector3D up(0, 1, 0);
	double fov = 100;
    
	// Defines a material for shading.
    SolidMaterial faceColor( Colour(0.85098039215686, 0.4, 0.43529411764706), Colour(0.85098039215686, 0.4, 0.43529411764706),
                       Colour(0.5, 0.5, 0.5),
                       10,
                       0.5,
                       0.3,
                       0.166);
    
	// Defines a point light source.
	raytracer.addLightSource( new PointLight(Point3D(0, 0, 2),
                                             Colour(0.9, 0.9, 0.9) ),
                             enableSpecular);
    
	// Add a unit square into the scene with material mat.
    CompositeShape* modelShape = ModelFactory::createCompositeShapeFromModel(std::string("face.obj"), &faceColor);
	SceneDagNode* model = raytracer.addObject(modelShape);
	modelShape->rotate('y', 190);
    modelShape->translate(Vector3D(0, -2, 20));
    
	// Render the scene, feel free to make the image smaller for
	// testing purposes.
	raytracer.render(width, height, eye, view, up, fov, "face.bmp");
}

#endif
